{layout '../Public/layoutList.latte'} {*继承layoutList模板*}
{block title}积分明细{/block}
{block actionstab}
    {include "./actionstab.latte"}
{/block}
{block actions}
    {*<a href="{url('consoles_acorn_submitApply','types=submit')}" class="icon-adds">提交申请</a>*}
{/block}
{block content}
    {if $lists}
        <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
            <tr>
                <th></th>
                <th><span class="table-head">姓名</span></th>
                <th><span class="table-head">标准</span></th>
                <th><span class="table-head">积分<i class="icon al-icon al-icon-influence" style="color:#0087e1"></i></span></th>
                <th><span class="table-head">申请人</span></th>
                <th><span class="table-head">审核人</span></th>
                <th><span class="table-head">发放时间</span></th>
            </tr>
            </thead>
            <tbody>

            {foreach $lists as $k=>$item}
                <tr>
                    <td style="width: 60px;display:none"><input type="checkbox" name='ids[]' class="checkall_1 checkall-item" value="{$item['a_id']}"/></td>
                    {if $item['a_sysMemo'] && !preg_match('/^\d+$/',$item['a_sysMemo'])}
                        <td style="width: 60px;">
                            <span class="spread">+</span>
                        </td>
                    {else}
                        <td style="width: 60px;">
                        </td>
                    {/if}
                    <td class="wid-auto">{$item['uName']}</td>
                    <td class="wid-auto">[{$item['names']}]{$item['sNames']}{if preg_match('/^\d+$/',$item['a_sysMemo'])}<span style="color:red">[#{$item['a_sysMemo']}]</span>{/if}</td>
                    <td class="wid-auto">{$item['a_acorn']}</td>
                    <td class="wid-auto">{$item['fullName']}</td>
                    <td class="wid-auto">{$item['fullNames']}</td>
                    <td class="wid-auto">{$item["a_addTime"]|totime}</td>
                </tr>
                <tr class="memo" hidden>
                    <td colspan="8" width="100%">{$item['a_sysMemo']|noescape}</td>
                </tr>
            {/foreach}
            </tbody>
        </table>
    {else}
        {if $params == 1}
            <div style="position:relative; width:100%; line-height:50px; display:block; text-align:center;">
                <img src="{path('[MobileConsoles]/img/null.png')}" alt="" class="" style="width:300px; height:100%; margin:50px auto 0; display:block;">
                <div style="width:100%; color:#999; text-align:center; font-size:1.5rem;">查询为空</div>
            </div>
        {else}
            <div style="position:relative; width:100%; line-height:50px; display:block; text-align:center;">
                <img src="{path('[MobileConsoles]/img/null.png')}" alt="" class="" style="width:300px; height:100%; margin:50px auto 0; display:block;">
                <div style="width:100%; color:#999; text-align:center; font-size:1.5rem;">暂时没有明细哦！</div>
            </div>
        {/if}
    {/if}
{/block}
{block private_js}
    <script type="text/javascript">
        $(function () {
            $(".spread ").click(function () {
                var is = $(this).parent().parent().index();
                is++;
                if (!$('tbody tr').eq(is).attr('id')) {
                    $('tbody tr').eq(is).attr('id', 'show');
                    $('tbody tr').eq(is).removeAttr('hidden');
                    is--;
                    $('tbody tr').eq(is).find('span.spread').text('-');
                }
                else {
                    $('tbody tr').eq(is).removeAttr('id');
                    $('tbody tr').eq(is).attr('hidden', 'hidden');
                    is--;
                    $('tbody tr').eq(is).find('span.spread').text('+');
                }
            });

        });
    </script>
{/block}
{block private_css}
    <style>
        .list-more-action{
            display:none;
        }
        .spread{
            display:block;
            width:25%;
            margin:auto;
            text-align:center;
            font-size:14px;
            line-height:14px;
            border:1px solid #333333;
        }

        .memo > td{
            text-align:center;
            line-height:32px;
        }
    </style>
{/block}



